<template>
  <div class="register child-box">
    <div class="item-box">
      <h3 class="title-wid">设计制造信息</h3>
      <div class="page-form my-form my-form-ele-300">
        <el-form :inline="true" :model="form" ref="form" label-width="140px">
          <el-form-item label="设计单位名称">
            <el-input v-model="form.designUnit"></el-input>
          </el-form-item>
          <el-form-item label="设计单位代码">
            <el-input v-model="form.designCode"></el-input>
          </el-form-item>
          <el-form-item label="制造单位名称">
            <el-input v-model="form.madeUnit"></el-input>
          </el-form-item>
          <el-form-item label="制造单位代码">
            <el-input v-model="form.madeCode"></el-input>
          </el-form-item>
          <el-form-item label="资格证书编码">
            <el-input v-model="form.maintenanceCertificateNo"></el-input>
          </el-form-item>
          <el-form-item label="制造许可证编号">
            <el-input v-model="form.madeCertificateNo"></el-input>
          </el-form-item>
          <el-form-item label="制造日期">
            <el-date-picker v-model="form.madeDate" type="date" placeholder="选择日期"
                            value-format='yyyy-MM-dd HH:mm:ss'></el-date-picker>
          </el-form-item>
          <el-form-item label="出厂编号">
            <el-input v-model="form.madeProductedNo"></el-input>
          </el-form-item>
          <el-form-item label="制造联系电话">
            <el-input v-model="form.madeTel"></el-input>
          </el-form-item>
          <el-form-item label="设计单位联系电话">
            <el-input v-model="form.designTel"></el-input>
          </el-form-item>


        </el-form>
      </div>

    </div>
    <div class="item-box">
      <!--downForm start-->
      <h3 class="title-wid">设备安装信息</h3>
      <!--form start-->
      <div class="page-form my-form my-form-ele-300">
        <el-form :inline="true" :model="form" ref="form" label-width="140px">
          <el-form-item label="年检日期" required>
            <el-date-picker v-model="form.installCheckDate" type="date" placeholder="选择日期"
                            value-format='yyyy-MM-dd HH:mm:ss'></el-date-picker>
          </el-form-item>
          <el-form-item label="初检日期" required>
            <el-date-picker v-model="form.installCheckNextDate" type="date" placeholder="选择日期"
                            value-format='yyyy-MM-dd HH:mm:ss'></el-date-picker>
          </el-form-item>
          <el-form-item label="电梯安装单位名称" required>
            <el-input v-model="form.installUnit"></el-input>
          </el-form-item>
          <el-form-item label="安装单位编码">
            <el-input v-model="form.installCode"></el-input>
          </el-form-item>
          <!--<el-form-item label="资格证书编号">-->
            <!--<el-input v-model="form.installCertificateNo"></el-input>-->
          <!--</el-form-item>-->
          <el-form-item label="开始施工日期">
            <el-date-picker v-model="form.installBuildStartDate" type="date" placeholder="选择日期"
                            value-format='yyyy-MM-dd HH:mm:ss'></el-date-picker>
          </el-form-item>
          <el-form-item label="安装单位项目负责人">
            <el-input v-model="form.installProjectLeader"></el-input>
          </el-form-item>
          <el-form-item label="土建验收单位">
            <el-input v-model="form.installAcceptUnit"></el-input>
          </el-form-item>

          <el-form-item label="安装单位联系电话">
            <el-input v-model="form.installTel"></el-input>
          </el-form-item>
          <el-form-item label="竣工验收日期">
            <el-date-picker v-model="form.installCompleteAccpetDate" type="date" placeholder="选择日期"
                            value-format='yyyy-MM-dd HH:mm:ss'></el-date-picker>
          </el-form-item>
          <el-form-item label="土建施工单位">
            <el-input v-model="form.installBuildUnit"></el-input>
          </el-form-item>
          <el-form-item label="竣工检验机构">
            <el-input v-model="form.installCheckUnit"></el-input>
          </el-form-item>
          <el-form-item label="检查验收报告编号">
            <el-input v-model="form.installCheckReportNo"></el-input>
          </el-form-item>
          <el-form-item label="登记表编号">
            <el-input v-model="form.installRegisterNo"></el-input>
          </el-form-item>
          <el-form-item label="检验类别名称">
            <el-input v-model="form.installCheckTypeName"></el-input>
          </el-form-item>
          <el-form-item label="检验结论名称">
            <el-input v-model="form.installCheckResultName"></el-input>
          </el-form-item>
          <el-form-item label="备注">
            <el-input type="textarea" v-model="form.installRemark"></el-input>
          </el-form-item>
        </el-form>
      </div>
      <!--form end-->
      <!--downForm end-->
    </div>

  </div>
</template>
<style lang="scss" scoped="scoped">
  @import '../../../../style/entry/page/eleAdd.scss';

</style>

<script>
  export default {
    data() {
      return {
        value1: '',
        value2: '',
        value3: '',
        value4: '',
        value5: '',
        form: {
          designUnit: '',                 // 设计单位名称
          designCode: '',                 // 设计单位代码
          madeUnit: '',                   // 制造单位名称
          madeCode: '',                   // 制造单位代码
          maintenanceCertificateNo: '',   // 资格证书编码
          madeCertificateNo: '',          // 制造许可证编号
          madeDate: '',                   // 制造日期
          madeProductedNo: '',            // 出厂编号
          madeTel: '',                    // 制造联系电话
          designTel: '',                  // 设计单位联系电话
          installUnit: '',                // 电梯安装单位名称
          installCheckDate: '',           // 年检日期
          installCode: '',                // 安装单位编码
          installCheckNextDate: '',       // 下检日期
          installCertificateNo: '',       // 资格证书编码
          installBuildStartDate: '',      // 开始施工日期
          installProjectLeader: '',       // 安装单位项目负责人
          installAcceptUnit: '',          // 土建验收单位
          installTel: '',                 // 安装单位联系电话
          installCompleteAccpetDate: '',  // 竣工验收日期
          installBuildUnit: '',           // 土建施工单位
          installCheckUnit: '',           // 竣工检验机构
          installCheckReportNo: '',       // 检查验收报告编号
          installRegisterNo: '',          // 登记表编号
          installCheckTypeName: '',       // 检验类别名称
          installCheckResultName: '',     // 检验结论名称
          installRemark: ''               // 备注
        },
      }
    },
    props: ['installMessage'],
    watch: {
      installMessage(value) {
        this.form = value
      }
    },
    mounted() {
      this.sendInstallMsgToParent()
    },
    methods: {
      submitInstallForm() {
        this.$refs['form'].validate((valid) => {
          if (valid) {
            alert('提交!');
          } else {
            alert('错误!')
            return false;
          }
        });
      },
      sendInstallMsgToParent: function () {
        this.$emit("listenToInstallChildEvent", this.form)
      }
    }
  }
</script>


